<?php

namespace app\api\controller;

use app\admin\model\Club;
use app\common\controller\Api;

/**
 * 文章
 */
class Article extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = '*';

    public function _initialize()
    {
        parent::_initialize();
    }

    public function ysxy(){
        $article = \app\admin\model\Article::where(['title'=>'隐私政策'])->find();
        $this->success('隐私协议',$article);
    }

    public function yhxy(){
        $article = \app\admin\model\Article::where(['title'=>'用户协议'])->find();
        $this->success('用户协议',$article);
    }

    public function rxdh(){
        $article = \app\admin\model\Article::where(['title'=>'热线电话'])->find();
        $this->success('热线电话',$article);
    }

    public function txsm(){
        $article = \app\admin\model\Article::where(['title'=>'提现说明'])->find();
        $this->success('提现说明',$article);
    }

    public function all(){
        $params = $this->request->param();
        if(!isset($params['title'])||!$params['title']){
            $this->error('缺少参数');
        }
        $article = \app\admin\model\Article::where(['title'=>$params['title']])->find();
        $this->success($params['title'],$article);
    }

}
